package com.aaa.config;


import org.springframework.security.crypto.password.PasswordEncoder;

public class PasswordEncoderConfig implements PasswordEncoder {
    /**
     * 解码
     */
    @Override
    public String encode(CharSequence rawPassword) {
        return rawPassword.toString();
    }

    /**
     * @param rawPassword 用户输入密码
     * @param encodedPassword 正确密码
     */
    @Override
    public boolean matches(CharSequence rawPassword, String encodedPassword) {
        return encodedPassword.equals(rawPassword);
    }
}
